#include <iostream>
#include <vector>
#include <string>

using namespace std;

vector<int> constructRectangle(int area) {
    vector<int> lw = {area, 1};
    while(lw[0] >= lw[1]){
        lw[1]++;
        if(area / lw[1] < lw[1]) break;
        if(area % lw[1] == 0) lw[0] = area / lw[1];
    }
    lw[1] = area / lw[0];
    return lw;
}

int main(){
    int area = 37;
    for(int i : constructRectangle(area)){
        cout << i << endl;
    }
    return 0;
}
